
#include    <stdio.h>

#include    "acel/unix_addr.hpp"

#include    "test/logger.hpp"

using namespace std;
using namespace test;
using namespace acel;

static  int
test_case_1( void )
{
    Logger& logger = test::Logger::getInstance();

    UNIX_Addr   addr_default;
    logger.info("default    path name : '%s'", addr_default.getPathName());
        
    UNIX_Addr   addr_rend("/tmp/unix_addr");
    logger.info("rendezvous path name : '%s'", addr_rend.getPathName());

    UNIX_Addr   addr_copy(addr_rend);
    logger.info("copy-ctor  path name : '%s'", addr_copy.getPathName());
            
    if ( addr_rend == addr_copy ) {
        logger.info("rendezvous-addr == copy-ctor-addr");
    }
    else {
        logger.info("rendezvous-addr != copy-ctor-addr");
    }
    
    char    szBuf[128];
    addr_rend.toString(szBuf, sizeof(szBuf));
    logger.info("rendezvous-addr.toString() get '%s'", szBuf);
    
    return  0;  
}


int main(int argc, char* argv[])
{
    Logger& logger = test::Logger::getInstance();
    logger.info("==== test begin ====");

    test_case_1();
        
    logger.info("==== test   end ====");
    return  0;
}

